#include <GL/glut.h>
#include "function.h"
#include <sstream>
using std::stringstream;

//variable n is used to control the recursive level
int n=0;

int main(int argc,char** argv){
	glutInit(&argc,argv);
	glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB);
	glutInitWindowSize(500,500);
	glutInitWindowPosition(0,0);
	glutCreateWindow("Peano Curve");
	init();
	
	//translate the parameter which is used to control
	//recursive level from string to int
	stringstream s;
	s<<argv[1];
	s>>n;

	glutDisplayFunc(display);
	glutReshapeFunc(reshape);

	glutMainLoop();
	return 0;
}
